package chai.ning.instance;

import java.io.PrintStream;

public class Monkey
{
  public String name;

  public Monkey()
  {
    System.out.println("Monkey : instance initializer");
    System.out.println(this.name);

    this.name = "猴儿";
    System.out.println(this.name);

    System.out.println("Monkey : constructor");
    System.out.println(this.name);
  }

  public void increment(int x)
  {
    x++;
  }

  public static void main(String[] args)
  {
    Monkey m = new Monkey();
    System.out.println(m);

    System.out.println("- - - - - - - - - - - - - - - -");

    Monkey o = new Monkey();
    System.out.println(o);

    System.out.println("- - - - - - - - - - - - - - - -");

    Monkey n = new Monkey();
    System.out.println(n);
  }
}